package com.example.android.plugin.demo.simple;

import android.app.Activity;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.os.Bundle;
import android.widget.TextView;

public class DemoActivity extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_demo);

		TextView tv = (TextView) this.findViewById(R.id.hello_world);
		tv.setText(this.getClassLoader().toString());
	}

	public void showPluginDialog(Context context) {
		new AlertDialog.Builder(context).setTitle("插件1")
				.setMessage("插件1弹出的对话框")
				.setPositiveButton("确定", new DialogInterface.OnClickListener() {
					public void onClick(DialogInterface dialog, int whichButton) {
						dialog.dismiss();
					}
				}).show();
	}
}
